<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>方法详情</title>
    <th:block th:replace="/backstage/common_resources::common_css"></th:block>
    <th:block th:replace="/backstage/common_resources::common_js"></th:block>
</head>
<body class="hold-transition skin-purple sidebar-mini">
<header th:replace="~{/backstage/common_header::header}"></header>
<aside th:replace="~{/backstage/common_aside::aside}"></aside>
<div class="wrapper">
    <div class="content-wrapper">
        <!-- 内容头部 -->
        <section class="content-header">
            <h1>
                方法管理
                <small>方法详情</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="@{/backstage/index}"><i class="fa fa-dashboard"></i> 首页</a></li>
                <li><a href="@{/backstage/opencv/all}"> 方法管理</a></li>
                <li class="active">方法详情</li>
            </ol>
        </section>
        <div class="pull-left">
            <div class="form-group form-inline">
                <div class="btn-group">
                    <a th:href="@{/backstage/method_add}">
                        <button type="button" class="btn btn-default" title="新建">
                            <i class="fa fa-file-o"></i> 新建
                        </button>
                    </a>
                </div>
            </div>
        </div>
        <!-- 内容头部 /-->


        <!-- 正文区域 -->
        <section class="content">
            <table id="dataList"
                   class="table table-bordered table-striped table-hover dataTable">
                <thead>
                <tr>
                    <th></th>
                    <th>方法名称</th>
                    <th>方法内容</th>
                    <th class="text-center">操作</th>
                </tr>
                </thead>

                <tbody>
                <tr th:each="method:${methods}">
                    <td><input name="methodID" type="checkbox" value="${method.methodID}"></td>
                    <td th:text="${method.methodName}"></td>
                    <td th:text="${method.content}"></td>
                    <td class="text-center">
<!--                        <a th:href="@{/backstage/algorithm/desc(methodID=${method.methodID})}" class="btn bg-green btn-xs">详情</a>-->
<!--                        下面这一个是你自己的-->
                        <a th:href="@{/backstage/algorithm/edit(methodID=${method.methodID})}" class="btn bg-olive btn-xs">修改</a>
<!--                        <a th:href="@{/backstage/algorithm/edit(algorithmID=${algorithmID})}" class="btn bg-olive btn-xs">修改</a>-->
<!--                        <a th:href="@{/backstage/algorithm/edit(methodID=${method.methodID}, algorithmID=${method.algorithmID})}" class="btn bg-olive btn-xs">修改</a>-->
                            <a th:onclick="|javascript:del(${method.methodID})|" class="btn bg-gray btn-xs">删除</a >
                    </td>
                </tr>
                </tbody>
            </table>
        </section>
        <!-- 正文区域 /-->


    </div>
</div>
<footer th:replace="~{/backstage/common_footer::footer}"></footer>
<script>
    function del(methodID) {
        if (confirm("确定要删除吗?")) {
            location.href = "/backstage/algorithm/delete?methodID=" + methodID;
        }
    }
    $(document).ready(function() {
        /*table tree*/
        $("#collapse-table").treetable({
            expandable: true
        });


    });
</script>
</body>
</html>
